package org.mcflier.appuntamento.data.model;

import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;

import org.mcflier.appuntamento.data.model.abstracts.AbstractTorrentList;
import org.mcflier.appuntamento.i18n.Language;

public class TorrentList extends AbstractTorrentList {
	
	private String title;
	private String link;
	private String description;
	private Timestamp pubDate;
	private Timestamp lastBuildDate;
	private Language language;
	private List<Torrent> items;

	public TorrentList(String sourceLink, String title, String link, String description, Timestamp pubDate, Timestamp lastBuildDate, Language language) {
		super(sourceLink);
		
		this.title = title;
		this.link = link;
		this.description = description;
		this.pubDate = pubDate;
		this.lastBuildDate = lastBuildDate;
		this.language = language;
		this.items = new ArrayList<Torrent>();
	}
	
	public TorrentList(String sourceLink, String title, String link){
		super(sourceLink);
		
		this.title = title;
		this.link = link;
		this.description = null;
		this.pubDate = null;
		this.lastBuildDate = null;
		this.language = null;
		this.items = new ArrayList<Torrent>();
	}
	
	@Override
	public String getTitle() {
		return this.title;
	}

	@Override
	public void setTitle(String title) {
		this.title = title;
	}

	@Override
	public String getLink() {
		return this.link;
	}

	@Override
	public void setLink(String link) {
		this.link = link;
	}

	@Override
	public String getDescription() {
		return this.description;
	}

	@Override
	public void setDescription(String description) {
		this.description = description;
	}

	@Override
	public Timestamp getPubDate() {
		return this.pubDate;
	}

	@Override
	public void setPubDate(Timestamp pubDate) {
		this.pubDate = pubDate;
	}

	@Override
	public Timestamp getLastBuildDate() {
		return this.lastBuildDate;
	}
	
	@Override
	public void setLastBuildDate(Timestamp lastBuildDate) {
		this.lastBuildDate = lastBuildDate;
	}

	@Override
	public Language getLanguage() {
		return this.language;
	}

	@Override
	public void setLanguage(Language language) {
		this.language = language;
	}
	
	@Override
	public void addItem(Torrent item) {
		this.items.add(item);
	}

	@Override
	public List<Torrent> getItems() {
		return this.items;
	}
}